﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>00: View Test</title>
	<style type="text/css">
		body, html {
			width: 100%;
			height: 100%;
			margin: 0;
			background-color: lightgreen;
			overflow: hidden;
		}
	</style>
	<script src="../bootloader.js" type="text/javascript"></script>
	<script type="text/javascript">
		go = function() {
			view = new opus.View({
				minWidth: 376,
				minHeight: 164,
				styles: {border: 8, padding: 4, borderColor: "green"},
				controls: [
					{l:0, t:0, r:120, b:60, controls: [
						{name: "json", w:"100%", h:"100%", styles: {bgColor:"#F1F1F1", overflow: "scroll", margin: 4, border: 4}},
						{r:124, b:30, w:83, h:28, styles: {border: 2}, content: "<button>Okesque</button>"},
						{r:30, b:30, w:87, h:28, styles: {border: 2}, content: "<button>Cancelish</button>"}
					]},
					{w:120, t:0, r:0, b:60, styles: {bgColor:"#F1F1F1", overflow: "auto", padding: 4, margin: 4, border: 4}, content: "Column"},
					{l:0, h:60, r:0, b:0, styles: {bgColor:"#F1F1F1", overflow: "auto", padding: 4, margin: 4, border: 4}, content: "Footer"},
					{w:8, h:8, styles: {bgColor:"red"}},
					{r:0, w:8, h:8, styles: {bgColor:"red"}},
					{b:0, w:8, h:8, styles: {bgColor:"red"}},
					{r:0, b:0, w:8, h:8, styles: {bgColor:"red"}}
				]
			});
			// Serialize view's properties as content for control "json"
			view.$.json.setContent("<pre>" + view.serialize() + "</pre>");
			// Render everything
			view.render();
		}
	</script>
</head>
<body onload="go()" onresize="view.resize()">
</body>
</html>
